

<include file="Common:layout" />
<style>
    .page{
        padding: 0 1%;
    }
    .fixed-bar {
        position: inherit;
        z-index: 99;
        top: inherit;
        left: inherit;
    }
</style>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
                <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>

            <div class="subject">
                <h3>商品信息</h3>
            </div>
            <ul class="tab-base nc-row">
                <li><a href="javascript:void(0);" data-index='1' class="tab current"><span>通用信息</span></a></li>
                <li><a href="javascript:void(0);" data-index='2' class="tab"><span>商品相册</span></a></li>
                <li><a href="javascript:void(0);" data-index='3' class="tab"><span>商品规格</span></a></li>
            </ul>
        </div>
    </div>

    <!--表单数据-->
    <form method="post" id="editGoodsForm" action="{:U('Good/edit')}">
        <input type="hidden" value="{$good['id']}" name="good_id">
        <!--通用信息-->
        <div class="ncap-form-default tab_div_1">
            <dl class="row">
                <dt class="tit">
                    <label>商品分类</label>
                </dt>
                <dd class="opt">
                    {$good['c_name']}
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">商品品牌</label>
                </dt>
                <dd class="opt">
                    {$good['b_name']}
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">商品名称</label>
                </dt>
                <dd class="opt">
                    {$good['g_name']}
                    <span class="err" id="err_goods_name" style="color:#F00; display:none;"></span>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="store_name">商品简介</label>
                </dt>
                <dd class="opt">
                    {$good['brief']}
                    <span id="err_brief" class="err" style="color:#F00; display:none;"></span>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">商品货号</label>
                </dt>
                <dd class="opt">
                    {$good['good_sn']}
                    <span class="err" id="err_good_sn" style="color:#F00; display:none;"></span>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">本店售价</label>
                </dt>
                <dd class="opt">
                    {$good['price']}
                    <span class="err" id="err_price" style="color:#F00; display:none;"></span>
                </dd>
            </dl>

            <dl class="row">
                <dt class="tit">
                    <label for="record_no">市场价</label>
                </dt>
                <dd class="opt">
                    {$good['market_price']}
                    <span class="err" id="err_market_price" style="color:#F00; display:none;"></span>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">销量</label>
                </dt>
                <dd class="opt">
                    {$good['sale_num']}
                    <span class="err" id="err_sale_num" style="color:#F00; display:none;"></span>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">佣金</label>
                </dt>
                <dd class="opt">
                    {$good['commission']}
                    <span class="err" id="err_commission" style="color:#F00; display:none;"></span>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>主图</label>
                </dt>
                <dd class="opt">
                    <a href="{$good[img]}" target="_blank">
                        <img src="{$good[img]}" style="height: 100px;" >
                    </a>
                </dd>
            </dl>

            <dl class="row">
                <dt class="tit">
                    <label for="record_no">商品重量</label>
                </dt>
                <dd class="opt">
                    {$good[weight]}
                    <span class="err" id="err_weight" style="color:#F00; display:none;"></span>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">库存</label>
                </dt>
                <dd class="opt">
                    {$good[stock]}
                    <span class="err" id="err_stock" style="color:#F00; display:none;"></span>
                </dd>
            </dl>


            <dl class="row">
                <dt class="tit">
                    <label for="record_no">是否退款</label>
                </dt>
                <dd class="opt">
                    <if condition="$good[is_back] eq 1">
                        否
                    <else/>
                        是
                    </if>
                </dd>
            </dl>

            <notempty name="good[noback_reason]">
                <dl class="row">
                    <dt class="tit">
                        <label for="record_no">无法退款原因</label>
                    </dt>
                    <dd class="opt">
                    {$good[noback_reason]}
                    </dd>
                </dl>
            </notempty>

            <dl class="row">
                <dt class="tit">
                    <label for="record_no">装箱件数</label>
                </dt>
                <dd class="opt">
                    {$good[per_num]}
                    <span class="err" id="err_per_num" style="color:#F00; display:none;"></span>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">商品详情描述</label>
                </dt>
                <dd class="opt">
                {$good[info]}
                </dd>
            </dl>
        </div>


        <!-- 商品相册-->
        <div class="ncap-form-default tab_div_2" style="display:none;">
            <dl class="row">
                <dt class="tit">
                    <label for="record_no"></label>
                </dt>
                <dd class="opt">
                   <foreach name="pics" item="pic">
                       <td>
                           <div class="goods_xc" style="width:100px; text-align:center; margin: 5px; display:inline-block;">
                               <input type="hidden" value="{$pic['img']}" class="goods_imgs">
                               <a href="{$pic['img']}" onclick="" target="_blank">
                                   <img src="{$pic['img']}" width="100" height="100">
                               </a>
                               <br>
                           </div>
                       </td>
                   </foreach>
                </dd>
            </dl>
        </div>
        <!-- 商品规格-->
        <div class="ncap-form-default tab_div_3" style="display:none;">
            <dl class="row">
                <dt class="tit">
                    <label>&nbsp; <a class="plus_spec" href="javascript:;"></a></label>
                </dt>
                <dd class="opt">
                    <div class="spec_box">
                        <notempty name="goodSpec">
                            <volist name="goodSpec" id="c" key="k">
                                <div><strong>{$c['s_name']}</strong>：{$c['spec_val']}</div>
                            </volist>
                        <else/>
                            暂无规格
                        </notempty>
                    </div>
                </dd>
            </dl>
        </div>

    </form>
    <!--表单数据-->
</div>
<div id="goTop"> <a href="JavaScript:void(0);" id="btntop"><i class="fa fa-angle-up"></i></a><a href="JavaScript:void(0);" id="btnbottom"><i class="fa fa-angle-down"></i></a></div>
<script>
    //选择分类
    $(function(){
        // 插件切换列表
        $('.tab-base').find('.tab').click(function(){
            $('.tab-base').find('.tab').each(function(){
                $(this).removeClass('current');
            });
            $(this).addClass('current');
            var tab_index = $(this).data('index');
            $(".tab_div_1, .tab_div_2, .tab_div_3, .tab_div_4,.tab_div_5").hide();
            $(".tab_div_"+tab_index).show();
        });
    })




</script>
</body>
</html>